import { createRouter, createWebHistory,createWebHashHistory } from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import Welcome from '../components/Welcome.vue'
import WorkCenter from '../components/Workshop_foundation/WorkCenter.vue'
import OperationalMaintenance from '../components/Workshop_foundation/OperationalMaintenance.vue'
import ResourceMaintenance from '../components/Workshop_foundation/ResourceMaintenance.vue'
import ProcessRoute from '../components/Workshop_foundation/ProcessRoute.vue'
import SiteMaintenance from '../components/Workshop_foundation/SiteMaintenance.vue'
import MaterialMaintenance from '../components/manufacture_supplies/MaterialMaintenance.vue'
import BOMmaintenance from '../components/manufacture_supplies/BOMmaintenance.vue'
import OrderIssued from '../components/manufacture_plan/OrderIssued.vue'
import OrderRepair from '../components/manufacture_plan/OrderRepair.vue'
import FeatureMaintenance from '../components/manufacture_process/FeatureMaintenance.vue'
import ButtonMaintenance from '../components/manufacture_process/ButtonMaintenance.vue'
import Operation from '../components/manufacture_process/Operation.vue'
import DisposeDefects from '../components/Product_quality/DisposeDefects.vue'
import RepairDefects from '../components/Product_quality/RepairDefects.vue'
import RepairCode from '../components/Product_quality/RepairCode.vue'
import YDPlantStock from '../components/YDPlantStock/YDPlantStock.vue'
import MaterialConsumption from '../components/Workshop_kanban/MaterialConsumption.vue'
import personerKanban from '../components/Workshop_kanban/personerKanban.vue'
import directorKanban from '../components/Workshop_kanban/directorKanban.vue'
import pandectKanban from '../components/Workshop_kanban/pandectKanban.vue'
import SFCInfo from '../components/data_analysis/SFCInfo.vue'
import Recode from '../components/data_analysis/Recode.vue'
import Progress from '../components/data_analysis/Progress.vue'
import YDPlantStockReport from '../components/data_analysis/YDPlantStockReport.vue'
import User from '../components/system_basis/User.vue'
import Role from '../components/system_basis/Role.vue'
import Menu from '../components/system_basis/Menu.vue'
import LoginData from '../components/login_info/LoginData.vue'
import SeachData from '../components/operation_log/SeachData.vue'

const routes = [{
    path: '/Login',
    component: Login
}, {
    path: '/',
    redirect: '/Login'
}, {
    path: '/Home',
    component: Home,
    redirect: '/welcome',
    children: [{
        path: '/welcome',
        component: Welcome
    }, {
        path: '/workcenter',
        component: WorkCenter
    }, {
        path: '/operation',
        component: OperationalMaintenance
    }, {
        path: '/operation_resource',
        component: ResourceMaintenance
    }, {
        path: '/routing',
        component: ProcessRoute
    }, {
        path: '/site',
        component: SiteMaintenance
    }, {
        path: '/item_manager',
        component: MaterialMaintenance
    }, {
        path: '/itembom_manager',
        component: BOMmaintenance
    }, {
        path: '/shoporder_make',
        component: OrderRepair
    }, {
        path: '/shoporder_Issued',
        component: OrderIssued
    }, {
        path: '/pod_function',
        component: FeatureMaintenance
    }, {
        path: '/pod_button',
        component: ButtonMaintenance
    }, {
        path: '/pod_panel',
        component: Operation
    }, {
        path: '/nc_group',
        component: RepairDefects
    }, {
        path: '/nc_code',
        component: RepairCode
    }, {
        path: '/nc_handle',
        component: DisposeDefects
    }, {
        path: '/get_item',
        component: YDPlantStock
    }, {
        path: '/kanban',
        component: MaterialConsumption
    }, {
        path: '/sfc_assemblyInfo',
        component: SFCInfo
    }, {
        path: '/prouction_record_report',
        component: Recode
    }, {
        path: '/scheduler_report',
        component: Progress
    }, {
        path: '/in_inventory_report',
        component: YDPlantStockReport
    }, {
        path: '/account',
        component: User
    }, {
        path: '/role',
        component: Role
    }, {
        path: '/ly_resources',
        component: Menu
    }, {
        path: '/ly_log_list',
        component: LoginData
    }, {
        path: '/ly_log',
        component: SeachData
    }, {
        path: '/personerKanban',
        component: personerKanban
    }, {
        path: '/directorKanban',
        component: directorKanban
    }, {
        path: '/pandectKanban',
        component: pandectKanban
    }]
}]

const router = createRouter({
    history: createWebHashHistory(),
    routes
});

export default router